<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'recommendations-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->hiddenField($model,'creator_id',array('value'=>Yii::app()->user->id));?>

	<?php echo $form->textFieldRow($model,'title',array('class'=>'span5','maxlength'=>45)); ?>

	<?php echo $form->textAreaRow($model,'description',array('rows'=>6, 'cols'=>30, 'class'=>'span5')); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'valid_from'); ?>
		<?php 
		$this->widget('ext.timepicker.timepicker', array(
			'model'=>$model,
			'name'=>'valid_from',
		));
		?>
		<?php echo $form->error($model,'valid_from'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'valid_to'); ?>
			<?php 
		$this->widget('ext.timepicker.timepicker', array(
			'model'=>$model,
			'name'=>'valid_to',
		));
		?>
		<?php echo $form->error($model,'valid_to'); ?>
	</div>

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
